<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>

<!DOCTYPE html>
<html>
	<head>
		<title>编辑中奖</title>
		<meta name="decorator" content="default"/>
		<script type="text/javascript">
			$(function() {
				//初始化表单验证
				$("#inputForm").initValidform();
			});
		</script>
	</head>
	
	<body class="mainbody">
		<form:form id="inputForm" modelAttribute="winner" action="${ctx}/sd/winner/save" method="post" class="form-horizontal">
			<form:hidden path="id"/>
			<!--导航栏-->
			<div class="location">
				<a href="${ctx}/sd/winner/list?isAward=1" class="back"><i></i><span>返回列表页</span></a>
				<a href="${ctx}/center" class="home"><i></i><span>首页</span></a> 
				<i class="arrow"></i> 
				<a href="${ctx}/sd/winner/form?id=${winner.id}"><span>中奖</span></a>
				<%-- <shiro:hasPermission name="sd:winner:edit"> --%><i class="arrow"></i><span>${not empty winner.id ? '修改':'添加' }中奖</span><%-- </shiro:hasPermission> --%>
			</div>	
			<div class="line10"></div>
			<!--/导航栏-->
	
			<!--内容-->
			<div id="floatHead" class="content-tab-wrap">
				<div class="content-tab">
					<div class="content-tab-ul-wrap">
						<ul>
							<li><a class="selected" href="javascript:;">中奖信息</a></li>
						</ul>
					</div>
				</div>
			</div>
	
			<div class="tab-content">
				<dl>
					<dt>会员编号</dt>
					<dd>
						<form:input  path="memberId" htmlEscape="false" maxlength="80" class="required" cssClass="input normal" datatype="*" nullmsg="会员编号" errormsg="会员编号" sucmsg=" "/>
						<span class="Validform_checktip">*会员编号</span>
					</dd>
				</dl>
				<dl>
					<dt>奖品名称</dt>
					<dd>
						<div class="rule-single-select single-select">
							<form:select   path="awardId" errormsg="请输入选择节点" sucmsg=" ">
							<c:choose>
							   <c:when test="${awardList ==null}">  
								   <form:option value="0"  label="暂无奖品"></form:option>
							   </c:when>
							   <c:otherwise> 
						    	  <form:options items="${awardList}" itemLabel="name" itemValue="id"/>
							   </c:otherwise>
							</c:choose>	
							</form:select>
						</div>
						<span class="Validform_checktip"></span>				
					</dd>
					
				</dl>
				<dl>		
					<dt>是否中奖</dt>	
					<dd>
							<div class="rule-multi-radio">
							    <form:radiobutton path="isAward"  value="0"  label="否" checked="checked" htmlEscape="false" maxlength="50" class="required" cssClass="input normal" datatype="*" nullmsg="请选择是否中奖" errormsg="请选择是否中奖" sucmsg=" "/>
							    <form:radiobutton path="isAward"  value="1"  label="是" htmlEscape="false" maxlength="50" class="required" cssClass="input normal" datatype="*" nullmsg="请选择是否中奖" errormsg="请选择是否中奖" sucmsg=" "/>
							</div>
					</dd>
				</dl>
				<dl>
					<dt>中奖时间</dt>
					<dd>
						<div class="date-input">
						<i></i>
							<fmt:formatDate  value="${winner.awardOn }" pattern="yyyy-MM-dd HH:mm" var="award"/>
							<form:input  path="awardOn"  value="${award }"  onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm' });"  htmlEscape="false" maxlength="50" class="required" cssClass="input normal" datatype="*" nullmsg="请输入中奖时间" errormsg="请输入中奖时间" sucmsg=" "/>
						</div>
					</dd>
				</dl>
				<dl>
					<dt>是否领奖</dt>
					<dd>
							<div class="rule-multi-radio">
							    <form:radiobutton path="isPrized"  value="0"  label="否" checked="checked" htmlEscape="false" maxlength="50" class="required" cssClass="input normal" datatype="*" nullmsg="请选择是否领奖" errormsg="请选择是否领奖" sucmsg=" "/>
							    <form:radiobutton path="isPrized"  value="1"  label="是" htmlEscape="false" maxlength="50" class="required" cssClass="input normal" datatype="*" nullmsg="请选择是否领奖" errormsg="请选择是否领奖" sucmsg=" "/>
							</div>
					</dd>
				</dl>
				<dl>
					<dt>领奖时间</dt>
					<dd>
						<div class="date-input">
						<i></i>
							<fmt:formatDate value="${winner.prizedOn }" pattern="yyyy-MM-dd HH:mm" var="prized"/>
							<form:input  path="prizedOn"  value="${prized}"  onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm' });"  htmlEscape="false" maxlength="50" class="required" cssClass="input normal" datatype="*" nullmsg="请输入领奖时间" errormsg="请输入领奖时间" sucmsg=" "/>
						</div>
					</dd>
				</dl>
				<dl>
					<dt>领奖人</dt>
					<dd>
							<form:input  path="receiver" htmlEscape="false" maxlength="50" class="required" cssClass="input normal" datatype="*" nullmsg="请输入领奖人" errormsg="请输入领奖人" sucmsg=" "/>
							<span class="Validform_checktip">*请输入领奖人</span>
					</dd>
				</dl>
				<dl>
					<dt>收货联系号码</dt>
					<dd>
						<form:input  path="recMobile" htmlEscape="false" maxlength="50" class="required" cssClass="input normal" datatype="*" nullmsg="请输入收货联系号码" errormsg="请输入收货联系号码" sucmsg=" "/>
						<span class="Validform_checktip">*请输入收货联系号码</span>
					</dd>
				</dl>
				<dl>
					<dt>收货地址</dt>
					<dd>
						<form:input  path="recAddr" htmlEscape="false" maxlength="50" class="required" cssClass="input normal" datatype="*" nullmsg="请输入收货地址" errormsg="请输入收货地址" sucmsg=" "/>
						<span class="Validform_checktip">*请输入收货地址</span>
					</dd>
				</dl>
			</div>
			<!--/内容-->
	
			<!--工具栏-->
			<div class="page-footer">
				<div class="btn-wrap">
					<input type="submit" name="btnSubmit" value="提交保存" id="btnSubmit" class="btn" /> 
					<input name="btnReturn" type="button" value="返回上一页" class="btn yellow" onclick="javascript:history.back(-1);" />
				</div>
			</div>
			<!--/工具栏-->
		</form:form>
	</body>
</html>

